<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    
    <title>在线存款</title>
	<script type="text/javascript" src = "js/jquery.js"></script>
	<style type="text/css">
		span{
			color:red;
		}
	</style>
  </head>
  
  <body>
  <h3>在线存款</h3>
  <form action="account.jspx?p=save" method = "post" id = "myform">
  		<input type = "text" name = "savemoney" id = "money"/><span id = "money_error"></span><br/>
  		<input type = "button" value = "提交" id = "btn"/>
  </form>
  
  <script type="text/javascript">
  	$(document).ready(function(){
	  	
	  	 $("#money").keydown(function(){
	  		$("#money_error").html("");
	  	});
  		$("#btn").click(function(){
  			
  			var money = $("#money").val();
  			
  			if(money <= 0 ){
  				$("#money").focus();
  				$("#money_error").html("请输入正确金额,金额不可以为负数：");
  				return ;
  			}
  			
  			$("#myform").submit();
  		});
  	});
  </script>
  </body>
</html>
